Distance metrics and clustering in recurrent neural networks

ABSTRACT

Distance metrics and clustering in recurrent neural networks. For example, a method includes determining whether topological patterns of activity in a collection of topological patterns occur in a recurrent artificial neural network in response to input of first data into the recurrent artificial neural network, and determining a distance between the first data and either second data or a reference based on the topological patterns of activity that are determined to occur in response to the input of the first data.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of U.S. application Ser. No. 16/710,176, filed 11 Dec. 2019, now published as US 2021/0182681 and allowed, which is hereby incorporated by reference.

TECHNICAL FIELD

This invention relates to distance metrics and clustering in recurrent neural networks, and more particularly to defining distance metrics relevant to the processing results of recurrent neural networks and using those distance metrics for clustering.

BACKGROUND

Artificial neural networks are devices that are inspired by the structure and functional aspects of networks of biological neurons. In particular, artificial neural networks mimic the information encoding and other processing capabilities of networks of biological neurons using a system of interconnected constructs called nodes. The arrangement and strength of connections between nodes in an artificial neural network determines the results of information processing or information storage by the artificial neural network.

Neural networks can be trained to produce a desired signal flow within the network and achieve desired information processing or information storage results. In general, training a neural network will change the arrangement and/or strength of connections between nodes during a learning phase. The training will be directed to achieving certain processing results. The processing results should be consistent with a set of examples, i.e., a training set. A neural network can be considered trained when sufficiently appropriate processing results are achieved by the neural network for given sets of inputs.

Among the ends to which neural networks can be trained is clustering. Clustering groups of objects such that the objects in a group or cluster are more similar to each other on some metric than to objects in other groups or clusters. Clustering is a part of many data processing pipelines-including, e.g., bioinformatics, data mining, data compression, statistical data analysis, and machine learning. Due to the importance of clustering, a variety of clustering algorithms have been developed and neural networks have been trained to cluster inputs. These algorithms and neural networks are more or less useful in a variety of different contexts. It should however be noted that there is no objectively “correct” clustering result. Rather, the desired clustering results depend on the results that one wants to achieve.

A classic example of a neural network that has been trained to perform clustering is a self-organizing map. Self-organizing maps are trained using competitive learning to produce a low-dimensional discretized representation of the input training samples. This representation is also called a “map.” Because training is fundamental to the processing performed by neural networks, these neural networks are generally unable to process data that deviates in form or in type from the data in the training set.

SUMMARY

The present methods and apparatus use topological patterns of activity that arise in even an untrained recurrent artificial neural network to define distance metrics. The distance metrics can be useful, e.g., when clustering different inputs. The topological patterns of activity generally occur over a period of time and can be represented in a collection of digits. At least some of the topological patterns of activity arise innately due to the structure of the recurrent artificial neural network. Hence, even an untrained recurrent artificial neural network can be used to cluster different inputs.

As an aside, even though some of the topological patterns of activity arise without training of the recurrent artificial neural network, it is not necessary that the recurrent artificial neural network remain completely untrained. Rather, the recurrent artificial neural network can itself be trained to synthetize the patterns that arise without training. It is not necessary that the patterns that arise without training be output from the recurrent artificial neural network and input into a separate classifier. Rather, the same recurrent artificial neural network in which the topological patterns of activity arise even without training can be trained to perform clustering activities.

In one aspect, methods, systems and apparatus, including computer programs encoded on a computer storage medium, for clustering inputs are described. For example, a method includes determining whether topological patterns of activity in a collection of topological patterns occur in a recurrent artificial neural network in response to input of first data into the recurrent artificial neural network, and determining a distance between the first data and either second data or a reference based on the topological patterns of activity that are determined to occur in response to the input of the first data. Corresponding systems and apparatus, including computer programs encoded on a computer storage medium, are also possible.

In another aspect, a method includes receiving information identifying occurrences of topological patterns of activity in a recurrent artificial neural network in response to input of a plurality of different elements into the recurrent artificial neural network, calculating distances between the different elements based on the occurrences of the topological patterns of activity, and adjusting one or more characteristics of the recurrent artificial neural network to increase or decrease the distances. Corresponding systems and apparatus, including computer programs encoded on a computer storage medium, are also possible.

These and other aspects can include one or more of the following features. Whether the topological patterns of activity in the collection occur in the recurrent artificial neural network in response to input of second data into the recurrent artificial neural network can also be determined. The distance is determined between the first data and the second data by comparing the topological patterns of activity that are determined to occur in response to the input of the first data with the topological patterns of activity that are determined to occur in response to the input of the second data. The distance can be determined between the first data and either a centroid of a cluster or a cluster boundary.

The occurrence of the topological patterns of activity can be represented in a collection of binary or multivalued digits that each indicate whether a respective topological pattern occurred or not. The distance can be determined using a distance metric that treats a first subset of the topological patterns of activity in the collection differently from a second subset of topological patterns of activity in the collection. For example, the first subset of the topological patterns can be weighed as more strongly indicative of distance than the second subset of topological patterns. The first data and the second data can include multiple classes of input data. The first subset of the topological patterns need only include topological patterns that arise in a region of the recurrent artificial neural network that is primarily perturbed by a single class of the input data. Each of the classes of input data can originate from a different sensor. The single class of input data need only originate only from a first of the sensors. The recurrent artificial neural network can be trained and the second subset of the topological patterns need only include topological patterns that arise in a region of the recurrent artificial neural network that reflects the training. The recurrent artificial neural network can also be untrained. A complexity of the topological patterns in the second subset of the topological patterns can be higher than a complexity of the topological patterns in the first subset. At least some of the topological patterns in the first subset can be included in the topological patterns in the second subset. Whether the topological patterns of activity in the collection occur in the recurrent artificial neural network in response to input of data into the recurrent artificial neural network can be repeatedly determined and the input data—including the first data and the second data—can be clustered based on a distance between the data. The distance is determined by comparing the respective topological patterns of activity that are determined to occur in response to the input of the data. The topological patterns of activity can include simplex patterns of activity occur. For example, the simplex patterns can enclose cavities. A timing of activity having a complexity that is distinguishable from other activity that is responsive to the input can be determined and topological structures can be identified based on the timing of the activity that has the distinguishable complexity.

A distance between elements can be determined by comparing the topological patterns of activity that are determined to occur in response to the input of the first element with the topological patterns of activity that are determined to occur in response to the input of the second element. The distances can be calculated using a distance metric that treats a first subset of the topological patterns of activity in the collection differently from a second subset of topological patterns of activity in the collection. The distance calculation can weigh the first subset of the topological patterns as more strongly indicative of distance than the second subset of topological patterns. A complexity of the topological patterns in the second subset of the topological patterns can be lower than a complexity of the topological patterns in the first subset. The information identifying occurrences of topological patterns of activity can include a first binary vector for a first element and a second binary vector for a second element. The distances can be calculated by calculating the distances between the binary vectors. The recurrent artificial neural network can be untrained.

The details of one or more embodiments of the invention are set forth in the accompanying drawings and the description below. Other features, objects, and advantages of the invention will be apparent from the description and drawings, and from the claims.

DESCRIPTION OF DRAWINGS

FIG. 1 is a schematic representation of an implementation of an artificial neural network system that abstracts and clusters data that originates from multiple, different sensors.

FIGS. 2 and 3 are representations of patterns of activity that can be identified and “read” to generate a collection of digits from neural network.

FIG. 4 is a graph that represents occurrences of patterns as a function of time.

FIG. 5 is a schematic representation of an approach for inputting data that originates from different sensors into neural network and processing the input data.

FIG. 6 is a schematic representation of how a recurrent neural network can be trained to produce a collection of digits that is tailored to achieve desirable distance metrics in a particular context.

FIG. 7 is a schematic representation of a calculation of a distance metric using a collection of digits that each represent the presence or absence of a respective topological pattern of activity in recurrent neural network Like reference symbols in the various drawings indicate like elements.

DETAILED DESCRIPTION

Biological brains cope with different types of input including, e.g., vision, audio, proprioception. Despite the diversity of the input, biological brains can extract different properties from that input and respond, e.g., with appropriate movements or conceptual abstractions responsive to the input. Neuroscientists have found a rich diversity of subsystems in brains that participate in these processes. They include, e.g., specific cells in the visual system that encode edges having particular orientations, “place cells” in the hippocampus that become active when an animal is at a precise spatial location, and even cells that encode even abstract but selective concepts (so called “grandmother cells”). The subsystems can furthermore encode time, spatial, conceptual, and/or hierarchical relationships. In short, part of a biological brain's innate functioning can be considered a combination of specific and unspecific clustering-some of which is innate and some of which is learned.

In some cases, recurrent artificial neural networks can be constructed to embody at least some of the properties of biological brains. Such recurrent artificial neural networks can incorporate innate specific structures of real brains and encode non-linear projections that are useful for different types of computations and clustering. The specific structures can include, e.g., structures that perform pre-clustering and approximately cluster inputs and reduce the dimensionality of the input data. The specific structures can also include, e.g., structures that perform direct and specific clustering of specific concepts—without learning those concepts in advance. As mentioned previously, a recurrent artificial neural network can itself be trained to synthetize the patterns in these structures and that arise without training for subsequent learned clustering.

Thus, unlike mathematical clustering algorithms that require the definition of an explicit distance function, an up-front definition of a distance function is not necessary for such recurrent artificial neural networks. Instead, the distance function(s) are implicitly encoded by the wiring of the nodes and their functional properties. Indeed, different nodes and different structures of the recurrent artificial neural networks can encode different distance functions. As a result, some structures or states of the recurrent artificial neural network may cluster input in an approach that resembles hierarchical clustering, whereas other structures or states may—at the same time—cluster input in an approach that resembles density-based clustering.

Topological patterns of activity that arise in even an untrained recurrent artificial neural networks thus represent a clustering of the different inputs. The topological patterns represent the state of a recurrent artificial neural network that arises in response to an input perturbation. The topological patterns filter out unnecessary or redundant characteristics of the response and make abstractions that are useful for clustering accessible. As discussed further below, in some cases, decision moments can be identified to further ensure that unnecessary or redundant characteristics of the response are filtered out and not used for clustering.

The topological patterns can be read from a recurrent artificial neural network as, e.g., a collection of (generally binary) digits that each represent the presence or absence of a respective topological pattern of activity in the network. Each of the digits represents a specific abstraction performed by the network on the input data. As discussed further below, each abstraction can be arbitrarily complex. A single digit can thus encode an arbitrarily complex abstraction and a set of digits can convey a set of abstractions, each with an arbitrary level of complexity.

The collection of digits furthermore allows distance metrics to be defined. In other words, the distance between two different collections of digits that arise in response to different inputs can be used to define the distance between those inputs. For example, a distance metric can be as simple as counting the number of certain types of simplices and calculating, e.g., a Hamming distance. As another example, a distance metric can be relatively more complicated, such as the earth mover distance calculated across the different simplex orders and their topographic appearance.

FIG. 1 is a schematic representation of an implementation of an artificial neural network system 100 that abstracts and clusters input data 50. Neural network system 100 includes a collection of inputs 105, the recurrent neural network 110 itself, a collection of outputs 115, and a distance calculator 125 that is dedicated to calculating the distance or the (dis)similarity between the abstractions of data 50 that are output over outputs 115.

In the illustrated implementation, recurrent neural network 110 receives data 50 that originates from multiple, different sensors over inputs 105. The sensors can be, e.g., transducers that convert different physical properties into data or devices that sense only data, such as, e.g., a device that senses the content of a document or data stream. In other implementations, recurrent neural network 110 receives data 50 that originates from a single sensor. In any case, the abstraction of data 50 by neural network 110 can be read from outputs 115 as, e.g., a collection of (generally binary) digits 120 that each represent the presence or absence of a respective topological pattern of activity in neural network 110 responsive to input data 50. These responsive patterns of activity represent a specific abstraction performed by the neural network 110 on input data 50. As discussed further below, the abstraction can be arbitrarily complex. A single digit can thus encode an arbitrarily complex abstraction and a set of digits can convey a set of abstractions, each with an arbitrary level of complexity.

Further, the topological patterns of activity—and their representation in digits 120—can be “universal” in the sense that they are not dependent on the origin of the data being input into the neural network. Rather, the topological patterns of activity express abstract characteristics of the data 50 that is being input into neural network 110—regardless of the origins of that data.

In more detail, data 50 may originate from different sensors and have different formats. For example, certain classes of data 50 (e.g., video or audio data) may change relatively rapidly in time, whereas other classes of data 50 (e.g., still image or temperature) may change relatively slowly or not at all. Notwithstanding the different origins and formats, neural network 110 can still abstract characteristics from the data. For example, neural network 110 may abstract:

-   -   physical traits (e.g., color, shape, orientation, speed),     -   categories (e.g., car, cat, dog), and/or     -   abstract qualitative traits (e.g., “alive” vs. “dead,” “smooth”         vs. “rough,” “animate” vs. “inanimate,” “hot” vs. “cold,” “open”         vs. “closed”).

The topological patterns of activity—and their representation in digits 120—are the response of neural network 110 to the diverse data 50. Typically, multiple topological patterns of activity will arise in response to a single input, whether the input is discrete (e.g., a still photo or a single reading from a transducer that measures a physical parameter) or continuous (e.g., a video or an audio stream).

At times, neural network 110 will respond to the input of data 50 that originates from different sensors with one or more topological patterns that are the same, even if other topological patterns are different. For example, neural network 110 may respond to either a temperature reading or a still image of a desert with a topological pattern that represents a qualitative assessment of “hot,” even if other topological patterns are also part of the response to each input. Similarly, neural network 110 can respond to the conclusion of a musical composition or a still image of a plate with crumbs with a topological pattern that represents a qualitative assessment of “done,” even if other topological patterns are also part of the response to each input. Thus, at times, the same characteristic may be abstracted from data that has different origins and different formats.

At times, neural network 110 will respond to the input of data 50 that originates from different sensors with one or more topological patterns that represent the synthesis or fusion of the characteristics of the data from those sensors. In other words, a single such pattern can represent an abstraction of the same characteristic that is present in different types of data. In general, the fusion or synthesis of data from different sensors will act to cause such patterns to arise or the strength of the activity of such patterns to increase. In other words, data from different sensors can act as “corroborative evidence” that the same characteristic is present in the diverse input data.

In some cases, topological patterns that represent the synthesis or fusion of the characteristics of data from different sensors will only arise if certain characteristics are present in the data from different sensors. Neural network 110 can in effect act as an AND gate and require that certain characteristics in data from different sensors in order for certain patterns of activity to arise. However, this need not be the case. Instead, the magnitude of the activity that forms a pattern may increase or the timing of the activity may shorten in response to data from different sensors. In effect, the topological patterns of activity—and their representation in digits 120—represent abstractions of the characteristics of data 50 in a very rich state space. In other words, the topological patterns of activity and their representation are not necessarily the predefined “results” of processing input data in the sense that, e.g., a yes/no classification is the predefined result yielded by a classifier, a set of related inputs is the predefined result yielded by a clustering device, or a prediction is the predefined result yielded by a forecasting model. Rather, the topological patterns are abstractions of the characteristics the input data in a richer state space. Although that state space may at times include abstractions such as a yes/no classification, the state space is not limited to only those predefined results.

Further, the topological patterns may abstract characteristics of only a portion (e.g., a particular region of an image or a particular moment in a video or audio stream or a particular detail of the input such as a pixel) of the input data, rather than the entirety of the input data. Thus, the state space of the abstractions is neither limited to either a predefined type of result (e.g., a classification, a cluster, or a forecast), nor to abstractions of the entirety of the input data. Rather, the topological patterns are a tool that allows the processing by a high-dimensional, non-linear, recurrent dynamic system (i.e., neural network 110) to be read. The topological patterns extract correlates of the data from the different sensors that arise in neural network 110, including correlates that fuse the data into a more complete “whole.”

Upon input of data 50, neural network 110 will respond with a certain activity. That activity will include:

-   -   activity that does not comport with defined topological         patterns, and     -   activity that does comport with defined topological patterns.         The activity in neural network 110 that does not comport with         defined topological patterns can in some cases be incorrect or         incomplete abstractions of the characteristics of the input data         50. Further, the activity in neural network 110 that does         comport with defined topological patterns can abstract different         characteristics of the input data 50. Each of the abstracted         characteristics may be more or less useful depending on the         application. By limiting digits 120 to representation of certain         topological patterns, both incorrect or incomplete abstractions         and abstraction of characteristics that are not relevant to a         particular application can be “filtered out” from digits 120.

In the illustrated implementation, data 50 includes one or more of sound data 60 that originates from, e.g., a microphone, still image data 62 that originates from, e.g., a still camera, video data 64 that originates from, e.g., a video camera, and temperature data 66 that originates from, e.g., a temperature sensor. This is for illustrative purposes only. Data 50 need not include one or more of sound data 60, still image data 62, video data 64, temperature data 66. Also, data 50 can include one or more of a variety of other different types of data including, e.g., pressure data, chemical composition data, acceleration data, electrical data, position data, or the like. As discussed further below, data 50 that originates from a sensor can undergo one or more processing actions prior to input into neural network 110. Examples of such processing actions include, e.g., non-linear processing in an artificial neural network device.

As discussed above, the topological patterns that arise in neural network 110 are abstractions of the characteristics the input data 50 in a rich state space. If one were to constrain data 50 to originating from a small number of sensors, it may be unlikely that neural network 110 would abstract the data from that sensor in certain ways. By way of example, it may be unlikely that neural network 110 would abstract temperature data 66 by itself into a pattern of activity that corresponds to a spatial trait like shape or orientation. However, as data from different sensors is input into neural network 110, the perturbations provoked by diverse input data 50 meet each other and can collectively influence the activity in neural network 110. As a result, the neural network 110 may abstract input data 50 into different or more certain patterns of activity.

For example, there may be a degree of uncertainty associated with the presence or absence of a pattern. If data 50 includes data from diverse range of sensors, both the diversity of the patterns and the certainty of the patterns may increase as the data 50 that originates from different sensors is synthesized or fused within the neural network 110. By way of analogy, a passenger who is sitting in a train at a train station may look out the window and see an adjacent train that appears to be moving. That same passenger may also, e.g., feel forward pressure from the seat. The fusion or synthesis of this information increases the passenger's degree of certainty that the passenger's train is moving, rather than the adjacent train. When neural network receives diverse input data 50, the perturbations provoked by that data can collectively be abstracted into different or more certain patterns of activity.

The ability of neural network 110 to process input data 50 from diverse sensors also provides a degree of robustness to the abstraction of that data. By way of example, one sensor of a group may become inaccurate or even inoperative and yet neural network 110 can continue to abstract data 50 from the other sensors. Often, neural network 110 will abstract data 50 from the other sensors into the same patterns of activity that would have arisen had all of the sensors been functioning as designed. However, in some instances, the certainty of those abstractions may decrease. Nevertheless, abstraction can continue even if such a problem should arise.

In the illustrated implementation, inputs 105 are schematically represented as a well-defined input layer of nodes that each passively relay the input to one or more locations in neural network 110. However, this is not necessarily the case. For example, in some implementations, one or more of inputs 105 can scale some portion or all of the input data or perform other preliminary processing before data is conveyed to neural network 110. As another example, data 50 may injected into different layers and/or edges or nodes throughout neural network 110, i.e., without a formal input layer as such. For example, a user can specify that data is to be injected into specific nodes or links that are distributed throughout network 110. As another example, neural network 110 need not be constrained to receiving input in a known, previously defined manner (e.g., always injecting a first bit into a first node, the second bit into a second node, . . . etc.). Instead, a user can specify that certain bits in the data are to be injected into edges rather than nodes, that the order of injection need not follow the order that the bits appear, or combinations of these and other parameters. Nevertheless, for the sake of convenience, the representation of inputs 105 as an input layer will be maintained herein.

Neural network 110 is schematically illustrated as a recurrent neural network. In recurrent neural networks, the connections between nodes form a directed graph along a temporal sequence and the network exhibits temporal dynamic behavior. In general, neural network 110 is a relatively complex neural network that is modelled on a biological system. In other words, neural network 110 can itself model a degree of the morphological, chemical, and other characteristics of a biological system. In general, neural networks 110 that are modelled on biological systems are implemented on one or more computing devices with a relatively high level of computational performance.

In contrast with, e.g., traditional feedforward neural networks, neural networks 110 that are modelled on biological systems may display background or other activity that is not responsive to input data 50. Indeed, activity may be present in such neural networks 110 even in the absence of input data 50.

However, upon input of data 50, a recurrent neural network 110 will be perturbed. Since the response of such a neural network 110 to a perturbation may depend, in part, on the state of neural network 110 at the time that data 50 is input, the response of such a neural network 110 to the input of data 50 may also depend on the background or other activity that is already present in neural network 110.

Nevertheless, even though such activity in a neural network is not responsive only to the input of data 50, it is responsive to input data 50. Digits 120 can thus represent the presence or absence topological structures that arise in the patterns of activity responsive to the input data even in a relatively complex neural network that is modelled on biological systems.

In the illustrated implementation, outputs 115 are schematically represented as a multi-node output layer. However, outputs 115 need not be a multi-node output layer. For example, output nodes 115 can be individual “reader nodes” that identify occurrences of a particular pattern of activity at a particular collection of nodes in neural network 110 and hence read the output of neural network 110. The reader nodes can fire if and only if the activity at a particular collection of nodes satisfies timing (and possibly magnitude or other) criteria. For example, output nodes 115 can be connected to a collection of nodes in neural network 110 and indicate the presence or absence topological structures based on, e.g., the activity levels of each individual node crossing a respective threshold activation level, a weighted sum of the activity levels of those nodes crossing a threshold activation level, or a non-linear combination of the activity levels of those nodes crossing a threshold activation level.

The output received over outputs 115 is collection of digits 120 that each represent the presence or absence of a respective pattern of activity in neural network 110, which can be implemented as a relatively complex neural network that models characteristics of a biological system. Collection 120 is only schematically illustrated and collection 120 can be, e.g., one-dimensional vector of digits, a two-dimensional matrix of digits, or other collection of digits. In general, the digits in collection 120 will be binary and indicate in a yes/no manner whether a pattern of activity is present or not. However, this is not necessarily the case. Instead, in some implementations, the digits in collection 120 will be multi-valued. The values can denote characteristics of the presence or absence of a respective pattern of activity in neural network 110. For example, the values can indicate the strength of the activity or a statistical probability that a specific pattern of activity is in fact present. By way of example, activity that is relatively large in magnitude or that occurs within a relatively short window of time can be considered as indicating that a specific operation has been performed or was likely to have been performed. In contrast, activity that is relatively small in magnitude or that occurs over a relatively longer time can be considered less likely to indicating that a specific operation has been performed.

The information in collection 120 is holographically represented in the sense that information about the value of a single digit is distributed across the values of other digits in the collection 120. In other words, random subsets of digits in collection 120 also contain information about the abstractions performed by the neural network 110 to input 50, just at lower resolution than would be present if all the digits in collection 120 were present. As discussed further below, different topological patterns have different degrees of complexity. Some relatively more complex patterns may include relatively less complex patterns and simple patterns can be assembled into more complex patterns. Moreover, relatively high levels of abstraction that are represented by some digits may be correlated to some extent with other abstractions represented by other digits. For example, a digit that represents the occurrence of an abstract qualitative trait like “alive” may be correlated with a digit that represents a qualitative trait like “animate.” Information about the occurrence of some topological patterns thus inherently includes some information about the occurrence of other topological patterns.

For the sake of convenience, the remainder of the application will refer to the digits of collection 120 as binary bits and the FIGS. will illustrate them as such. However, it is to be understood that in all cases the digits of collection 120 can also be multi-valued to encode various aspects of the abstractions performed by the network.

Distance calculator 125 is a device that is dedicated to calculating the distance or the (dis)similarity between the different abstractions of data 50 that are output over outputs 115. Distance calculator 125 can use any of a variety of different approaches to calculate the distance. For example, distance calculator 125 can calculate a Hamming distance, an earth mover distance, a Jaccard similarity measure, or other distance measure. A survey of distance measures that are applicable to binary features vectors can be found in the publication entitled “A survey of Binary similarity and distance measures” by Sung-seok Choi et al. (Journal of Systemics, Cybernetics and Informatics, p. 43-48 (2010)). An example selection of an appropriate distance measure can be found in Wijaya et al. (BMC Bioinformatics 17:520 (2016)). The contents of both of these are incorporated herein by reference.

Distance calculator 125 includes an input 135 and an output 140. Input 135 is coupled to receive representations of the patterns of activity in neural network 110, namely, digit collection 120. Distance calculator 125 can receive digit collection 120 in a variety of ways. For example, the digits in collection 120 can be received as collection of discrete events or as a continuous stream over a real time or non-real time communication channel.

Output 140 is coupled to output a measure of distance that relates to the digit collection 120 received from neural network 110. For example, output 140 can output a measure distance between two digit collections 120 that have been output from neural network 110, between a digit collection 120 that has been output from neural network 110 and a digit collection that has been output by another neural network 110, and/or between digit collection 120 that has been output from neural network 110 and a reference such as, e.g., a centroid of a cluster or a cluster boundary.

In some implementations, distance calculator 125 is integrated into neural network 110. In other words, neural network 110 can output a distance measure directly. The distance measure can measure distance between, e.g., two different sets of input into neural network 110, the evolution of a single set of input into neural network 110, or the distance between the input data and a reference. In some implementations, the distance measure output from neural network 110 can be passed on to another application and/or used for training neural network 110. The distance measures output from distance calculator 125 can be used in a variety of different contexts. For example, distance measures can be used to evaluate resultant clusters, determine an optimal number of clusters, identify correlations among attributes in clusters, and estimate the degree of clustering in a data set. For example, Davies-Bouldin indices, Dunn indices, silhouette coefficients, and Hopkins statistics can be calculated using distance metrics.

The distance measures output from distance calculator 125 can be beneficial in these and other contexts. For high-dimensional data, distance becomes less useful for resolving elements and clusters. In particular, all of the elements in the space appear comparably (dis)similar as the number of dimensions increases. In other words, as the number of dimensions approaches infinity, the difference between the distance between nearest neighbors and the distance between farthest neighbors approaches zero.

However, digits 120 that represent the presence or absence of a respective topological pattern of activity responsive to input data 50 can be valuable for calculating distance metrics for high-dimensional data. As a threshold matter, even the simplest of abstractions that are represented in digits 120 inherently reduces the dimensionality of the input data. Digits 120 thus inherently define the distance between even high dimensional input data based on the topological patterns of activity that arise in recurrent neural network 110 in response to the input data 50.

Further, as discussed above, a topological pattern of activity can embody different levels of abstraction. For example, an abstraction represented by the occurrence of a first topological pattern may require the co-occurrence of two other topological patterns that represent other, “lower level” abstractions. A set of digits can thus convey a set of abstract characteristics that are useful for computing a distance metric according to a diverse levels of abstraction.

The different levels of abstraction also allow entirely new distance metrics to be defined. For example, a single digit 120 that indicates that different elements were abstracted to the same relatively high level abstraction can be a stronger indicator of similarity than a host of digits 120 that represent abstraction of input data to a variety of relatively low level abstractions. This contrasts with, e.g., a Hamming distance and other approaches that inherently treat all of the information in a feature vector similarly.

In some implementations, recurrent neural network 110 can be trained to achieve certain processing results. In general, the training will teach the recurrent neural network 110 to arrive at higher level abstractions based on combinations of lower level abstractions. Measurements of the distance between two elements that thus be tailored by training and training-specific distance metrics can be defined. A user need not have prior knowledge or an understanding of the dimensions of input data that are relevant to the processing results or to the resultant distance metric. Rather, the training process itself can tailor recurrent neural network 110 to achieve desired processing results and provide abstractions that are relevant for computing distance.

FIG. 2 is a representation of patterns 400 of activity that can be identified and “read” to generate collection 120 from neural network 110 (FIG. 1 ).

Patterns 400 are representations of activity within a recurrent artificial neural network. To read patterns 400, a functional graph is treated as a topological space with nodes as points. Activity in nodes and links that comports with patterns 400 can be recognized as ordered regardless of the identity of the particular nodes and/or links that participate in the activity. In the illustrated implementation, patterns 400 are all directed cliques or directed simplices. In such patterns, activity originates from a source node that transmits signals to every other node in the pattern. In patterns 400, such source nodes are designated as point 0 whereas the other nodes are designated as points 1, 2 . . . . Further, in directed cliques or simplices, one of the nodes acts a sink and receives signals transmitted from every other node in the pattern. In patterns 400, such sink nodes are designated as the highest numbered point in the pattern. For example, in pattern 405, the sink node is designated as point 2. In pattern 410, the sink node is designated as point 3. In pattern 415, the sink node is designated as point 3, and so on. The activity represented by patterns 400 is thus ordered in a distinguishable manner.

Each of patterns 400 has a different number of points and reflects ordered activity in a different number of nodes. For example, pattern 405 is a 2D-simplex and reflects activity in three nodes, pattern 410 is a 3D-simplex and reflects activity in four nodes, and so on. As the number of points in a pattern increases, so does the degree of ordering and the complexity of the activity. For example, for a large collection of nodes that have a certain level of random activity within a window, some of that activity may comport with pattern 405 out of happenstance. However, it is progressively more unlikely that random activity will comport with the respective of patterns 410, 415, 420. . . . The presence of activity that comports with pattern 430 is thus indicative of a relatively higher degree of ordering and complexity in the activity that the presence of activity that comports with pattern 405.

Different duration windows can be defined for different determinations of the complexity of activity. For example, when activity that comports with pattern 430 is to be identified, longer duration windows can be used than when activity that comports with pattern 405 is to be identified.

FIG. 3 is a representation of patterns 300 of activity that can be identified and “read” to generate binary digit collection 120 from neural network 110 (FIG. 1 ).

Patterns 300 are groups of directed cliques or directed simplices of the same dimension (i.e., have the same number of points) that define patterns involving more points than the individual cliques or simplices and enclose cavities within the group of directed simplices.

By way of example, pattern 305 includes six different three point, 2-dimensions patterns 405 that together define a homology class of degree two, whereas pattern 310 includes eight different three point, 2-dimensions patterns 405 that together define a second homology class of degree two. Each of the three point, 2-dimensions patterns 405 in patterns 305, 310 can be thought of as enclosing a respective cavity. The nth Betti number associated with a directed graph provides a count of such homology classes within a topological representation.

The activity represented by patterns such as patterns 300 represents a relatively high degree of ordering of the activity within a network that is unlikely to arise by random happenstance. Patterns 300 can be used to characterize the complexity of that activity.

In some implementations, only some patterns of activity are identified and/or some portion of the patterns of activity that are identified are discarded or otherwise ignored. For example, with reference to FIG. 2 , activity that comports with the five point, 4-dimensional simplex pattern 415 inherently includes activity that comports with the four point, 3-dimensional and three point, 2-dimension simplex patterns 410, 405. For example, points 0, 2, 3, 4 and points 1, 2, 3, 4 in 4-dimensional simplex pattern 415 of FIG. 2 both comport with 3-dimensional simplex pattern 410. In some implementations, patterns that include fewer points—and hence are of a lower dimension—can be discarded or otherwise ignored. As another example, only some patterns of activity need be identified. For example, in some implementations only patterns with odd number of points (3, 5, 7, . . . ) or even numbers of dimensions (2, 4, 6, . . . ) are identified. Notwithstanding the identification of only some patterns, information about the activity in the neural network can nevertheless be holographically represented, i.e., at lower resolution that if all patterns of identified and/or represented in an output.

As discussed above, the patterns of activity that are responsive to input data 50 represent a specific operation of arbitrary complexity performed by the neural network 110 on that input data 50. In some implementations, the complexity of the operation will be reflected in the complexity of the topological pattern. For example, the operation or abstraction represented by the five point, 4-dimensional simplex pattern 415 may be more complex than the operations or abstractions represented by the four point, 3-dimensional and three point, 2-dimension simplex patterns 410, 405. In such cases, digits that represent the presence of activity convey that a set operations or abstractions is performed in neural network 110, where each of these operations or abstractions has an arbitrary level of complexity.

FIG. 4 is a schematic representation of a determination of the timing of activity patterns that have a distinguishable complexity. The determination represented in FIG. 4 can be performed as part of an identification or “reading” of patterns of activity to generate binary digit collection 120 from neural network 110 (FIG. 1 ).

FIG. 4 includes a graph 605 and a graph 610. Graph 605 represents occurrences of patterns as a function of time along the x-axis. In particular, individual occurrences are represented schematically as vertical lines 606, 607, 608, 609. Each row of occurrences can be instances where activity matches a respective pattern or class of pattern. For example, the top row of occurrences can be instances where activity matches pattern 405 (FIG. 2 ), the second row of occurrences can be instances where activity matches pattern 410 (FIG. 2 ), the third row of occurrences can be instances where activity matches pattern 415 (FIG. 2 ), and so on.

Graph 605 also includes dashed rectangles 615, 620, 625 that schematically delineate different windows of time when the activity patterns have a distinguishable complexity. As shown, the likelihood that activity in the recurrent artificial neural network matches a pattern indicative of complexity is higher during the windows delineated by dashed rectangles 615, 620, 625 than outside those windows.

Graph 610 represents the complexity associated with these occurrences as a function of time along the x-axis. Graph 610 includes a first peak 630 in complexity that coincides with the window delineated by dashed rectangle 615 and a second peak 635 in complexity that coincides with the window delineated by dashed rectangles 620, 625. As shown, the complexity represented by peaks 630, 635 is distinguishable from what can be considered to be a baseline level 640 of complexity.

In some implementations, the times at which the output of a recurrent artificial neural network is to be read coincide with the occurrences of activity patterns that have a distinguishable complexity. For example, in the illustrative context of FIG. 4 , the output of a recurrent artificial neural network can be read at peaks 630, 635, i.e., during the windows delineated by dashed rectangles 615, 620, 625.

In some implementations, not only the content but also the timing of the activity patterns that have a distinguishable complexity can be output from the recurrent artificial neural network. In particular, not only the identity and activity of the nodes that participate in activity that comports with the activity patterns, but also the timing of the activity patterns can be considered the output of the recurrent artificial neural network. The identified activity patterns as well as the timing when this decision is to be read can thus represent the result of processing by the neural network.

FIG. 5 is a schematic representation of an approach for inputting data 50 that originates from different sensors into neural network 110 and processing the input data. In the illustrated implementation, different subsets 105′, 105″, 105′″ of network inputs 105 are dedicated to receiving different types of input data. For example, a first subset 105′ can be dedicated to receiving a first class of input data (e.g., data that originates from a first sensor) whereas a second subset 105″ can be dedicated to receiving a second class of input data (e.g., data that originates from a second sensor).

In some implementations, corresponding “regions” 505, 510 of neural network 110 receive different classes of input data from different subsets 105′, 105″, 105′″ of network inputs 105. For example, in the schematic illustration, regions 505, 510 are shown spatially discrete collections of nodes and edges with relatively few node-to-node connections between each region. This is not necessarily the case. Rather, the nodes and edges of each region 505, 510 can be spatially distributed within neural network 110 but yet receive a particular class of input data.

Regardless the distribution of the nodes in each region 505, 510, the processing in each region 505, 510 is primarily—but not necessarily exclusively—perturbed by the respectively received class of input data. The extent of perturbation can be measured based on the activity that occurs in a region with and without the respective class of input data being present. For example, a region that is primarily perturbed by a first class of input data may respond to the first class of input data in generally the same manner regardless of whether other classes of input data perturb network 110 at the same time. The processing and abstractions performed by each region 505, 510 are primarily influenced by the received class of input data. Nevertheless, the topological patterns of activity that arise in each region 505, 510 can be read as a digit collection 120. The same is true for other regions of recurrent neural network 110.

This schematically represented in neural network system 500 by separately designating different subsets 115′, 115″, 115′″ of network outputs 115. In particular, subset 115′ can be dedicated to outputting digits that represent topological patterns of activity that arise in region 505 of neural network 110, whereas subset 115′″ can be dedicated to outputting digits that represent topological patterns of activity that arise in region 5100 of neural network 110. However, subset 115″ outputs digits that are not found in either of regions 505, 510. Indeed, the digits that are output in subset 115″ may represent a fusion or further abstraction of the abstract representations and processing results that arise in regions 505, 510 to a higher level of complexity.

For example, a given digit in subset 115″ may arise if and only if both one or more digits in subset 115′ and one or more digit in subset 115′″ have certain values. The digit in subset 115″ can thus represent an arbitrarily higher level abstraction-both of the abstractions generated in regions 655, 660 but also of the input data itself.

When different regions are primarily perturbed by a single class of input data, the processing in those regions can be tailored to the nature of the input data. For example, the depth of connection and the topology of network loops can be tailored to the input data. In recurrent neural networks that are modelled on biological systems, neuronal dynamics and synaptic plasticity can also be tailored to the input data. The tailoring, e.g., capture different time scales. For example, the processing in a region that is tailored to processing classes of input data that changes relatively rapidly (e.g., video or audio data) can be faster than the processing in a region that is tailored to processing classes of input data that changes relatively slowly or not at all.

Further, when different regions of a recurrent neural network are primarily perturbed by a single class of input data, it is easier for humans to attribute the representations that arise in a recurrent neural network to particular input data. The representations that arise in a particular region can be attributed to the class of input data that primarily perturbs that region. Once the representations that arise in a particular region are attributed, higher level and more complex abstractions that arise in response to the representations in a particular region can also be more easily understood.

Also, training can be targeted to portions of a recurrent neural network that are not primarily perturbed by a single class of input data, i.e., targeted to the portions of a recurrent neural network that fuse the processing results of regions that are primarily perturbed by a single class of input data. In effect, the regions that are primarily perturbed by a single class of input data will generate representations of the input data that are universal—not only for output from the recurrent neural network but also for further abstraction and other operations with the recurrent neural network.

FIG. 6 is a schematic representation of how a recurrent neural network 110 can be trained to produce a collection of digits 120 that is tailored to achieve desirable distance metrics in a particular context.

For example, the digits can be tailored based on the type of input that is going to be received by neural network 110. The tailoring can, e.g., ensure that neural network 110 is sufficiently sensitive to certain differences in different input data and/or sufficiently insensitive to other differences in the input data. In effect, the digits can be tailored to ensure that different collections of digits 120 are sufficiently close or distant from one another (e.g., that the “crowding distance” between different collections of digits 120 is desirable).

In addition to recurrent neural network 110 and distance calculator 125, the illustrated implementation of neural network system 100 also includes a comparator 610 and a training unit 615.

Comparator 610 is a device that is configured to compare the distance metric output 140 by distance calculator 125 with a desired output 630. The comparison can yield a cost function or other measure of how close the distance metric output 140 is to the desired output 630.

Training unit 615 is a device that is configured to alter one or more attributes of recurrent neural network 110 based on a measure of how close the distance metric output 140 is to the desired output 630 to reduce the differences therebetween. For example, training unit 615 can add or remove either nodes or links from neural network 110, change the weights of links, change the topological patterns that are represented in digit collection 120, or other modify recurrent neural network 110. In implementations where recurrent neural network 110 is a relatively complex neural network that is modelled on a biological system, training unit 615 can alter, e.g., morphological, chemical, or other characteristics of the model.

The training of recurrent neural network 110 to produce a collection of digits 120 that produces desirable distance metrics can be beneficial in a variety of different contexts. For example, as discussed above, neural network 110 can be trained to achieve a desirable sensitivity to certain characteristics of the input data. Such tailoring can be performed, e.g., to improve the adversarial resistance of neural network 110 by making neural network 110 insensitive to adversarial attack. As another example, such tailoring can be performed to ensure that neural network 110 clusters input data into a desirable number of clusters. As yet another example, such tailoring can be performed to ensure that digit collection 120 includes digits that are relevant for particular downstream processes such as, e.g., classification or other supervised learning applications. As yet another example, such tailoring can be performed to adapt activity thresholds in neural network 110. For example, thresholds can be adapted based on the amount of “noise” in the environment, where the noise is input data that potentially contributes to the activity level in neural network 110. By adapting the thresholds, neural network 110 can be made insensitive to the noise.

FIG. 7 is a schematic representation of a calculation of a distance metric using a collection of digits 120 that each represent the presence or absence of a respective topological pattern of activity in recurrent neural network 110. As shown, digit collection 120 includes digits that have originated from different subsets 115′, 115″, 115′″ of network outputs 115 recurrent neural network 110 that are dedicated to outputting representations that arise in different regions, such as regions 505, 510, 515 (FIG. 5 ). As in FIG. 5 , subsets 115′ and 115′″ can be dedicated to outputting representations of relatively “low level” abstractions whereas subsets 115″ can be dedicated to outputting representations of relatively “high level” abstractions.

As represented schematically by the dashed line, a distance calculator 125 can treat the low level abstractions and the high level abstractions differently during calculation of a distance metric. The different treatment can be implemented in a variety of different ways. For example, higher level abstractions can be weighted more heavily than lower level abstractions. As another example, a first distance calculation may be used for low level abstractions whereas a second for high level abstractions. As another example, the calculation of a distance metric can proceed in a multi-step process. For example, in a first step, high level abstractions can be used in a first process, whereas the low level abstractions can be used in a second process. Indeed, the weights or other parameters used in the calculation of the distance metric for the low level abstractions can be adjusted on the distance calculated for the high level abstractions in the first process.

In this way, not only can a single recurrent neural network produce different levels of abstraction, but the calculation of a distance metric can accommodate those different levels by treating different levels of abstraction differently. This can lead to new approaches to calculating distance metrics that can handle even high-dimensionality data.

Treating different levels of abstraction differently can beneficial in a number of contexts. For example, different levels of abstraction can be used for preclustering large amounts of data or incremental/progressive clustering in which clustering starts with coarse unrefined clusters that are gradually improved in successive operations.

Embodiments of the subject matter and the operations described in this specification can be implemented in digital electronic circuitry, or in computer software, firmware, or hardware, including the structures disclosed in this specification and their structural equivalents, or in combinations of one or more of them. Embodiments of the subject matter described in this specification can be implemented as one or more computer programs, i.e., one or more modules of computer program instructions, encoded on computer storage medium for execution by, or to control the operation of, data processing apparatus. Alternatively or in addition, the program instructions can be encoded on an artificially generated propagated signal, e.g., a machine-generated electrical, optical, or electromagnetic signal, that is generated to encode information for transmission to suitable receiver apparatus for execution by a data processing apparatus. A computer storage medium can be, or be included in, a computer-readable storage device, a computer-readable storage substrate, a random or serial access memory array or device, or a combination of one or more of them. Moreover, while a computer storage medium is not a propagated signal, a computer storage medium can be a source or destination of computer program instructions encoded in an artificially generated propagated signal. The computer storage medium can also be, or be included in, one or more separate physical components or media (e.g., multiple CDs, disks, or other storage devices).

The operations described in this specification can be implemented as operations performed by a data processing apparatus on data stored on one or more computer-readable storage devices or received from other sources.

The term “data processing apparatus” encompasses all kinds of apparatus, devices, and machines for processing data, including by way of example a programmable processor, a computer, a system on a chip, or multiple ones, or combinations, of the foregoing The apparatus can include special purpose logic circuitry, e.g., an FPGA (field programmable gate array) or an ASIC (application specific integrated circuit). The apparatus can also include, in addition to hardware, code that creates an execution environment for the computer program in question, e.g., code that constitutes processor firmware, a protocol stack, a database management system, an operating system, a cross-platform runtime environment, a virtual machine, or a combination of one or more of them. The apparatus and execution environment can realize various different computing model infrastructures, such as web services, distributed computing and grid computing infrastructures.

A computer program (also known as a program, software, software application, script, or code) can be written in any form of programming language, including compiled or interpreted languages, declarative or procedural languages, and it can be deployed in any form, including as a stand alone program or as a module, component, subroutine, object, or other unit suitable for use in a computing environment. A computer program may, but need not, correspond to a file in a file system. A program can be stored in a portion of a file that holds other programs or data (e.g., one or more scripts stored in a markup language document), in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files that store one or more modules, sub programs, or portions of code). A computer program can be deployed to be executed on one computer or on multiple computers that are located at one site or distributed across multiple sites and interconnected by a communication network.

The processes and logic flows described in this specification can be performed by one or more programmable processors executing one or more computer programs to perform actions by operating on input data and generating output. The processes and logic flows can also be performed by, and apparatus can also be implemented as, special purpose logic circuitry, e.g., an FPGA (field programmable gate array) or an ASIC (application specific integrated circuit).

Processors suitable for the execution of a computer program include, by way of example, both general and special purpose microprocessors, and any one or more processors of any kind of digital computer. Generally, a processor will receive instructions and data from a read only memory or a random access memory or both. The essential elements of a computer are a processor for performing actions in accordance with instructions and one or more memory devices for storing instructions and data. Generally, a computer will also include, or be operatively coupled to receive data from or transfer data to, or both, one or more mass storage devices for storing data, e.g., magnetic, magneto optical disks, or optical disks. However, a computer need not have such devices. Moreover, a computer can be embedded in another device, e.g., a mobile telephone, a personal digital assistant (PDA), a mobile audio or video player, a game console, a Global Positioning System (GPS) receiver, or a portable storage device (e.g., a universal serial bus (USB) flash drive), to name just a few. Devices suitable for storing computer program instructions and data include all forms of non-volatile memory, media and memory devices, including by way of example semiconductor memory devices, e.g., EPROM, EEPROM, and flash memory devices; magnetic disks, e.g., internal hard disks or removable disks; magneto optical disks; and CD ROM and DVD-ROM disks. The processor and the memory can be supplemented by, or incorporated in, special purpose logic circuitry.

To provide for interaction with a user, embodiments of the subject matter described in this specification can be implemented on a computer having a display device, e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor, for displaying information to the user and a keyboard and a pointing device, e.g., a mouse or a trackball, by which the user can provide input to the computer. Other kinds of devices can be used to provide for interaction with a user as well; for example, feedback provided to the user can be any form of sensory feedback, e.g., visual feedback, auditory feedback, or tactile feedback; and input from the user can be received in any form, including acoustic, speech, or tactile input. In addition, a computer can interact with a user by sending documents to and receiving documents from a device that is used by the user; for example, by sending web pages to a web browser on a user's client device in response to requests received from the web browser.

While this specification contains many specific implementation details, these should not be construed as limitations on the scope of any inventions or of what may be claimed, but rather as descriptions of features specific to particular embodiments of particular inventions. Certain features that are described in this specification in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination. Moreover, although features may be described above as acting in certain combinations and even initially claimed as such, one or more features from a claimed combination can in some cases be excised from the combination, and the claimed combination may be directed to a subcombination or variation of a subcombination.

Similarly, while operations are depicted in the drawings in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order, or that all illustrated operations be performed, to achieve desirable results. In certain circumstances, multitasking and parallel processing may be advantageous. Moreover, the separation of various system components in the embodiments described above should not be understood as requiring such separation in all embodiments, and it should be understood that the described program components and systems can generally be integrated together in a single software product or packaged into multiple software products.

Thus, particular implementations of the subject matter have been described. Other implementations are within the scope of the following claims. In some cases, the actions recited in the claims can be performed in a different order and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In certain implementations, multitasking and parallel processing may be advantageous.

A number of implementations have been described. Nevertheless, it will be understood that various modifications may be made. Accordingly, other implementations are within the scope of the following claims. 

1. (canceled)
 2. A method comprising: determining a distance between first data and either second data or a reference using information that identifies topological patterns of activity that occur in response to an input of the first data into a recurrent neural network, wherein the distance is determined using a distance metric that treats a first subset of the topological patterns of activity differently from a second subset of the topological patterns of activity; and clustering the first data based on the determined distances.
 3. The method of claim 2, wherein the distance is determined between the first data and either a centroid of a cluster or a cluster boundary of the second data.
 4. The method of claim 2, wherein: the occurrence of the topological patterns of activity is represented in a collection of binary or multivalued digits that each indicate whether a respective topological pattern occurred or not.
 5. The method of claim 2, wherein the distance is determined using a distance metric that treats a first subset of the topological patterns of activity differently from a second subset of topological patterns of activity.
 6. The method of claim 5, wherein clustering the first data based on the determined distances comprises clustering the first subset of the topological patterns of activity and the second subset of the topological patterns of activity at different levels of cluster refinement.
 7. The method of claim 5, wherein the distance metric weighs the first subset of the topological patterns as more strongly indicative of distance than the second subset of topological patterns.
 8. The method of claim 5, wherein: the first data and the second data include multiple classes of input data; and the first subset of the topological patterns only includes topological patterns that arise in a region of the recurrent neural network that is primarily perturbed by a single class of the input data.
 9. The method of claim 8, wherein: each of the multiple classes of input data originates from a different sensor; and the single class of input data originates only from a first of the sensors.
 10. The method of claim 5, wherein: the recurrent neural network is trained; and the second subset of the topological patterns only includes topological patterns that arise in a region of the recurrent neural network that reflects the training.
 11. The method of claim 2, wherein the recurrent neural network is untrained.
 12. The method of claim 5, wherein a complexity of the topological patterns in the second subset of the topological patterns is higher than a complexity of the topological patterns in the first subset.
 13. The method of claim 5, wherein at least some of the topological patterns in the first subset are included in the topological patterns in the second subset.
 14. The method of claim 2, further comprising: repeatedly determining a distance between data inputs using information that identifies topological patterns of activity; and progressively clustering the data inputs based on the determined distances.
 15. The method of claim 14, wherein the progressive clustering increases cluster refinement in successive repetitions.
 16. The method of claim 15, wherein a coarseness of clustered data inputs improves in successive repetitions.
 17. At least one computer-readable storage medium encoded with executable instructions that, when executed by at least one processor, cause the at least one processor to perform operations comprising: determining a distance between first data and either second data or a reference using information that identifies topological patterns of activity that occur in response to an input of the first data into a recurrent neural network, wherein the distance is determined using a distance metric that treats a first subset of the topological patterns of activity differently from a second subset of the topological patterns of activity; and clustering the first data based on the determined distances.
 18. The computer-readable storage medium of claim 17, wherein the distance is determined using a distance metric that treats a first subset of the topological patterns of activity differently from a second subset of topological patterns of activity.
 19. The computer-readable storage medium of claim 18, wherein clustering the first data based on the determined distances comprises clustering the first subset of the topological patterns of activity and the second subset of the topological patterns of activity at different levels of cluster refinement.
 20. A system comprising one or more computers and one or more storage devices storing instructions that are operable, when executed by the one or more computers, to cause the one or more computers to perform operations comprising: determining a distance between first data and either second data or a reference using information that identifies topological patterns of activity that occur in response to an input of the first data into a recurrent neural network, wherein the distance is determined using a distance metric that treats a first subset of the topological patterns of activity differently from a second subset of the topological patterns of activity; and clustering the first data based on the determined distances.
 21. The system of claim 20, wherein: the distance is determined using a distance metric that treats a first subset of the topological patterns of activity differently from a second subset of topological patterns of activity; and clustering the first data based on the determined distances comprises clustering the first subset of the topological patterns of activity and the second subset of the topological patterns of activity at different levels of cluster refinement. 